using System;
using System.Web.UI.WebControls;

namespace HeroldIT.Dnn.Modules.WebControls
{
    /// <summary>
    /// Arguments passed to the event for fetching hierarchical data.
    /// </summary>
    public class HierarchicalDataEventArgs : EventArgs
    {
        #region properties

        /// <summary>
        /// Gets the master <see cref="DropDownList" />'s selected value.
        /// </summary>
        public string MasterValue
        {
            get; private set;
        }

        /// <summary>
        /// Gets or sets data source for the slave <see cref="DropDownList"/>.
        /// </summary>
        public object SlaveDataSource
        {
            get; set;
        }

        #endregion

        #region constructors

        /// <summary>
        /// Creates a new HierarchicalDataEventArgs object.
        /// </summary>
        /// <param name="masterValue">The value of the master <see cref="DropDownList"/>.</param>
        public HierarchicalDataEventArgs(string masterValue)
        {
            this.MasterValue = masterValue;
        }

        #endregion
    }
}